find_package(PkgConfig)
pkg_check_modules(PC_SHEENBIDI  sheenbidi)

find_path(SHEENBIDI_INCLUDE_DIRS
    NAMES SheenBidi.h
    HINTS ${PC_SHEENBIDI_INCLUDEDIR}
    ${PC_SHEENBIDI_INCLUDE_DIRS}
    PATH_SUFFIXES SheenBidi
)

find_library(SHEENBIDI_LIBRARIES
    NAMES sheenbidi
    HINTS ${PC_SHEENBIDI_LIBDIR}
    ${PC_SHEENBIDI_LIBRARY_DIRS}
)

if(SHEENBIDI_INCLUDE_DIRS AND SHEENBIDI_LIBRARIES)
    set(SHEENBIDI_FOUND TRUE)
    set(SHEENBIDI_LIBRARY ${SHEENBIDI_LIBRARIES})
    set(SHEENBIDI_INCLUDE_DIR ${SHEENBIDI_INCLUDE_DIRS})
    set(SHEENBIDI_VERSION ${PC_SHEENBIDI_VERSION})
endif()

include(FindPackageHandleStandardArgs)
#FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fribidi REQUIRED_VARS SHEENBIDI_INCLUDE_DIRS SHEENBIDI_LIBRARIES 
#	FOUND_VAR SHEENBIDI_FOUND VERSION_VAR SHEENBIDI_VERSION)

mark_as_advanced(SHEENBIDI_LIBRARIES SHEENBIDI_LIBRARY SHEENBIDI_INCLUDE_DIRS SHEENBIDI_INCLUDE_DIR SHEENBIDI_FOUND)

